INCLUDES:=./
SRCS:=$(wildcard *.cc)
LIBS:= -fno-rtti -lalibabacloud-oss-cpp-sdk -lcurl -lwfrest -lworkflow -lssl -lcrypto -lcrypt -lpthread
OBJS:=$(patsubst %.cc, %.o, $(SRCS))
SERVER:=server

$(SERVER): main.o token.o hash.o
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

%.o:%.cc
	g++ -c $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

HASH:=hash
TOKEN:=token
OSS:=oss

$(HASH): hash.o testhash.o
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

$(TOKEN): token.o testToken.o
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g
$(OSS): testOss.o
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g



clean:
	rm -rf $(OBJS) $(SERVER) $(HASH) $(TOKEN)
